#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main() {
    char a, b;
    while (scanf("%c", &a) != EOF) {
        if (a >= 'A' && a <= 'Z')
            printf("%c\n", a + 32);
        else
            printf("%c\n", a - 32);
        getchar();
    }
    return 0;
}